﻿{% extends "aboutme/base.html" %}
{% block title %}{{ text.cattagpage_title }}{% endblock %}

{% block content %}

<div class="row"><br></div>

<div class="row">
 <div class="col-md-1"></div>
 <div class="col-md-10">
  <div class="row">
   {% include "aboutme/search.html" %}
  </div>
  <div class="row"><br></div>
  {% if error %}
  <div class="row">
   {% include "aboutme/check_error.html" %}
  </div>
  {% endif %}
  
  <div class="row">
   <em>
   {% ifequal page_lang 'rus' %}
   Найдено {{ items|length }} элементa(ов).
   {% endifequal %}
   {% ifequal page_lang 'eng' %}
   {{ items|length }} elements found.
   {% endifequal %}
   {% ifequal page_lang 'fr' %}
   {{ items|length }} elements sont trouve.
   {% endifequal %}
   </em>
  </div>
  {% for item in items %}
   <em>
   <div class="row">
    <div class="col-md-6">
     <div class="text-left">
      {{ item.author }}
     </div>
    </div>
    <div class="col-md-6">
     <div class="text-right">
      {{ item.created }}
     </div>
    </div>
   </div>
   </em>
   <div class="row">
    <div class="col-md-12">
     <div class="text-left">
      {% ifequal item.itemtype 'Link' %}
       <span class="label label-info">{{ text.itemtype_link }}</span>
       <a href="{{ item.url }}"><strong>{{ item.title }}</strong></a>
      {% endifequal %}
      {% ifequal item.itemtype 'Post' %}
       <span class="label label-info">{{ text.itemtype_post }}</span>
       <strong>{{ item.title }}</strong>
      {% endifequal %}
     </div>
    </div>
   </div>
   <div class="row">
    <div class="col-md-12">
     <div class="text-left">
       {% ifequal item.itemtype 'Link' %}
        {{ item.description }}
       {% endifequal %}
       {% ifequal item.itemtype 'Post' %}
        {{ item.content }}
       {% endifequal %}
     </div>
    </div>
   </div>
   <div class="row">
    <div class="col-md-6">
     <div class="text-left">
      <a href="/search/category/{{ item.category }}/{{ page_lang }}">{{ item.category }}</a>
     </div>
    </div>
    <div class="col-md-6">
     <div class="text-right">
      {% for tag in item.tags.all %}
       <a href="/search/tag/{{ tag.name }}/{{page_lang}}/">{{ tag.name }}</a>
      {% endfor %}
     </div>
    </div>
   </div>

   <hr>

  {%endfor %}

 </div>
 <div class="col-md-1"></div>
</div>
{% endblock %}
